package com.zxc.controller.sysuser;

import com.zxc.entity.SysUser;
import com.zxc.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;
import java.util.List;

@Controller
@RequestMapping(value = "/sysUser")
public class SysUserController {

    @Autowired
    private SysUserService sysUserService;

    @RequestMapping(value = "/getSysUserList")
    @ResponseBody
    public List<SysUser> getSysUserList(@RequestParam(value = "userId",defaultValue = "0") Integer userId
    , HttpSession session){
        System.out.println();
        List<SysUser> sysUserList = sysUserService.selectSysUserById(userId);
        return sysUserList;
    }

}
